package com.rentdvd.ws;

import java.rmi.RemoteException;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import NET.webserviceX.www.GlobalWeatherSoapProxy;

import com.rentdvd.entity.User;
import com.rentdvd.util.HibernateUtil;

public class Test {
	public static void main(String[] args) {
		// User user = new User();
		// user.setUsername("gokhan");
		// user.setPassword("1234");
		//
		// SessionFactory sf = HibernateUtil.getSessionFactory();
		// Session session = sf.openSession();
		// session.beginTransaction();
		// session.save(user);
		// session.getTransaction().commit();
		// session.close();

		GlobalWeatherSoapProxy service = new GlobalWeatherSoapProxy();
		String result = null;
		try {
			result = service.getWeather("istanbul", "turkey");
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		System.out.println(result);
	}
}
